package lab03.test03;



/*import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test03 {
    public static void main(String[] args) {
        FileOutputStream fileOutputStream = null;
        try {
            fileOutputStream = new FileOutputStream("D:\\旅院\\作业\\java\\2.txt");
            fileOutputStream.write(new String("Beijing 欢迎你！").getBytes());
            String f = new String("Beijing 欢迎你！");
            f.getBytes();
            fileOutputStream.write("\r\n".getBytes());//换行
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                fileOutputStream.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        //追加
        FileOutputStream file = null;
        try {
            file = new FileOutputStream("D:\\旅院\\作业\\java\\2.txt", true);
            file.write(("我的学号是：你自己的学号").getBytes());

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                file.close();
            } catch (IOException e) {
                e.printStackTrace();
            }

        }
    */